package co.edu.unal.satacredito.ejbs;


import javax.ejb.Stateless;

import co.edu.unal.satacredito.database.entity.Transaction;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * Session Bean implementation class ValidationEJB
 */
@Stateless
public class ValidationEJB{

   public String getMachineName() throws FileNotFoundException, IOException {
		
		Properties properties = new Properties();
		properties.load(new FileInputStream(System
				.getenv("SATACREDITO_PATH")
				+ "/"
				+ "config/connection"
				+ "/" + "machine" + ".properties"));

		
		String consumer_key = properties.getProperty("MACHINE_NAME");
		
		return consumer_key;
	}
}